function(b_1_b name)
    add_executable(${name} ${name}.cpp)
    add_dependencies(${name} ${PROJECT_NAME}_static)
    target_link_libraries(${name} ${TENSOR_COMPUTING_LIBRARIES})
endfunction()

if (USE_CROSS_COMPILE)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
endif(USE_CROSS_COMPILE)

b_1_b(test_activation)
b_1_b(test_attention)
b_1_b(test_clip)
b_1_b(test_concat)
b_1_b(test_convolution)
b_1_b(test_depthwise_convolution)
b_1_b(test_dilated_convolution)
b_1_b(test_eltwise)
b_1_b(test_fully_connected)
b_1_b(test_lstm)
b_1_b(test_multiply)
b_1_b(test_pooling)
b_1_b(test_reshape)
b_1_b(test_softmax)
b_1_b(test_split)
b_1_b(test_slice)
b_1_b(test_scale)
b_1_b(test_transpose)

if (USE_INT8)
    b_1_b(test_int8_convolution)
    b_1_b(test_int8_depthwise_convolution)
    b_1_b(test_int8_concat)
    b_1_b(test_int8_pooling)
endif(USE_INT8)

b_1_b(test_bnn_convolution)
